using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._ParcelTools
{
    /// <summary>
    /// <para>Analyze Parcels By Least Squares Adjustment</para>
    /// <para>Analyzes the parcel fabric measurement network by running a least-squares adjustment on the input parcels. A least-squares adjustment is a mathematical procedure that uses statistical analysis to estimate  the most likely coordinates for connected points in a measurement network. A least-squares adjustment can be run on the parcel fabric to evaluate and improve spatial accuracy of parcel corner point locations.</para>
    /// <para>通过对输入宗地运行最小二乘法平差来分析宗地结构测量网络。最小二乘法平差是一种数学过程，它使用统计分析来估计测量网络中连接点的最可能坐标。可以在宗地结构上运行最小二乘法平差，以评估和提高宗地拐角点位置的空间精度。</para>
    /// </summary>    
    [DisplayName("Analyze Parcels By Least Squares Adjustment")]
    public class AnalyzeParcelsByLeastSquaresAdjustment : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public AnalyzeParcelsByLeastSquaresAdjustment()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_parcel_fabric">
        /// <para>Input Parcel Fabric</para>
        /// <para>The input parcel fabric to be analyzed by least-squares adjustment.</para>
        /// <para>要通过最小二乘法平差分析的输入宗地结构。</para>
        /// </param>
        /// <param name="_analysis_type">
        /// <para>Analysis Type</para>
        /// <para><xdoc>
        ///   <para>Specifies the type of least-squares analysis that will be used in the adjustment.</para>
        ///   <bulletList>
        ///     <bullet_item>Consistency check—A free-network least-squares adjustment will be run to check dimensions on parcel lines for inconsistencies and mistakes. Fixed or weighted control points will not be used by the adjustment.</bullet_item><para/>
        ///     <bullet_item>Weighted least squares—A weighted least-squares adjustment will be run to compute updated coordinates for parcel points. The parcels being adjusted should connect to at least two fixed or weighted control points.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将在调整中使用的最小二乘分析的类型。</para>
        ///   <bulletList>
        ///     <bullet_item>一致性检查—将运行自由网络最小二乘法调整以检查宗地线上的尺寸是否存在不一致和错误。调整不会使用固定或加权控制点。</bullet_item><para/>
        ///     <bullet_item>加权最小二乘法—将运行加权最小二乘法调整以计算宗地点的更新坐标。被调整的宗地应至少连接到两个固定或加权控制点。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        public AnalyzeParcelsByLeastSquaresAdjustment(object _in_parcel_fabric, _analysis_type_value _analysis_type)
        {
            this._in_parcel_fabric = _in_parcel_fabric;
            this._analysis_type = _analysis_type;
        }
        public override string ToolboxName => "Parcel Tools";

        public override string ToolName => "Analyze Parcels By Least Squares Adjustment";

        public override string CallName => "parcel.AnalyzeParcelsByLeastSquaresAdjustment";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_in_parcel_fabric, _analysis_type.GetGPValue(), _convergence_tolerance, _updated_parcel_fabric, _updated_adjustment_points, _updated_adjustment_lines, _updated_adjustment_vectors];

        /// <summary>
        /// <para>Input Parcel Fabric</para>
        /// <para>The input parcel fabric to be analyzed by least-squares adjustment.</para>
        /// <para>要通过最小二乘法平差分析的输入宗地结构。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Parcel Fabric")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_parcel_fabric { get; set; }


        /// <summary>
        /// <para>Analysis Type</para>
        /// <para><xdoc>
        ///   <para>Specifies the type of least-squares analysis that will be used in the adjustment.</para>
        ///   <bulletList>
        ///     <bullet_item>Consistency check—A free-network least-squares adjustment will be run to check dimensions on parcel lines for inconsistencies and mistakes. Fixed or weighted control points will not be used by the adjustment.</bullet_item><para/>
        ///     <bullet_item>Weighted least squares—A weighted least-squares adjustment will be run to compute updated coordinates for parcel points. The parcels being adjusted should connect to at least two fixed or weighted control points.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将在调整中使用的最小二乘分析的类型。</para>
        ///   <bulletList>
        ///     <bullet_item>一致性检查—将运行自由网络最小二乘法调整以检查宗地线上的尺寸是否存在不一致和错误。调整不会使用固定或加权控制点。</bullet_item><para/>
        ///     <bullet_item>加权最小二乘法—将运行加权最小二乘法调整以计算宗地点的更新坐标。被调整的宗地应至少连接到两个固定或加权控制点。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Analysis Type")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _analysis_type_value _analysis_type { get; set; }

        public enum _analysis_type_value
        {
            /// <summary>
            /// <para>Consistency check</para>
            /// <para>Consistency check—A free-network least-squares adjustment will be run to check dimensions on parcel lines for inconsistencies and mistakes. Fixed or weighted control points will not be used by the adjustment.</para>
            /// <para>一致性检查—将运行自由网络最小二乘法调整以检查宗地线上的尺寸是否存在不一致和错误。调整不会使用固定或加权控制点。</para>
            /// </summary>
            [Description("Consistency check")]
            [GPEnumValue("CONSISTENCY_CHECK")]
            _CONSISTENCY_CHECK,

            /// <summary>
            /// <para>Weighted least squares</para>
            /// <para>Weighted least squares—A weighted least-squares adjustment will be run to compute updated coordinates for parcel points. The parcels being adjusted should connect to at least two fixed or weighted control points.</para>
            /// <para>加权最小二乘法—将运行加权最小二乘法调整以计算宗地点的更新坐标。被调整的宗地应至少连接到两个固定或加权控制点。</para>
            /// </summary>
            [Description("Weighted least squares")]
            [GPEnumValue("WEIGHTED_LEAST_SQUARES")]
            _WEIGHTED_LEAST_SQUARES,

        }

        /// <summary>
        /// <para>Convergence Tolerance</para>
        /// <para>The tolerance representing the maximum coordinate shift expected after iterating the least-squares adjustment. A least-squares adjustment is run repeatedly (in iterations) until the solution converges. The solution is considered converged when maximum coordinate shift encountered becomes less than the specified convergence tolerance. The default value is 0.05 meters.</para>
        /// <para>表示迭代最小二乘法调整后预期的最大坐标偏移的容差。最小二乘法调整重复运行（迭代），直到解收敛。当遇到的最大坐标偏移小于指定的收敛容差时，该解被视为收敛。默认值为 0.05 米。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Convergence Tolerance")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public string _convergence_tolerance { get; set; } = "0.05 Meters";


        /// <summary>
        /// <para>Updated Parcel Fabric</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Parcel Fabric")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _updated_parcel_fabric { get; set; }


        /// <summary>
        /// <para>Updated Adjustment Points</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Adjustment Points")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _updated_adjustment_points { get; set; }


        /// <summary>
        /// <para>Updated Adjustment Lines</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Adjustment Lines")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _updated_adjustment_lines { get; set; }


        /// <summary>
        /// <para>Updated Adjustment Vectors</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Adjustment Vectors")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _updated_adjustment_vectors { get; set; }


        public AnalyzeParcelsByLeastSquaresAdjustment SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}